package cn.ly817.jay.entity;

import java.util.Date;

/**
 * Created by LuoYu on 2016/12/2.
 */
public class Note {
    private long id;

    private long submitterId;

    private User submitter;

    private long readerId;

    private User reader;

    private int type;

    private long missionId;

    private String detail;

    private String comment;

    private float completeness;

    private float score;

    private boolean state;

    private Mission mission;

    private int svnRev;

    private Date generateDate;

    public Note() {
    }

    /**
     * 任务条初始化构造函数
     */
    public Note(int type, long missionId, String detail, float completeness, boolean state,int svnRev,Date generateDate,long submitterId,long readerId) {
        this.type = type;
        this.missionId = missionId;
        this.detail = detail;
        this.completeness = completeness;
        this.state = state;
        this.svnRev = svnRev;
        this.generateDate = generateDate;
        this.submitterId = submitterId;
        this.readerId = readerId;
    }

    /**
     * 日志构造器
     */
    public Note(int type, String detail, String comment, Date generateDate,boolean state,long submitterId,long readerId) {
        this.type = type;
        this.detail = detail;
        this.comment = comment;
        this.generateDate = generateDate;
        this.submitterId = submitterId;
        this.readerId = readerId;
        this.state = state;
    }

    public Note(long id, Date generateDate, String comment) {
        this.id = id;
        this.generateDate = generateDate;
        this.comment = comment;
    }

    @Override
    public String toString() {
        return "Note{" +
                "id=" + id +
                ", submitterId=" + submitterId +
                ", submitter=" + submitter.toString() +
                ", readerId=" + readerId +
                ", reader=" + reader.toString() +
                ", type=" + type +
                ", missionId=" + missionId +
                ", detail='" + detail + '\'' +
                ", comment='" + comment + '\'' +
                ", completeness=" + completeness +
                ", score=" + score +
                ", state=" + state +
                ", mission=" + mission.toString() +
                ", svnRev=" + svnRev +
                ", generateDate=" + generateDate +
                '}';
    }

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }

    public Mission getMission() {
        return mission;
    }

    public void setMission(Mission mission) {
        this.mission = mission;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public long getMissionId() {
        return missionId;
    }

    public void setMissionId(long missionId) {
        this.missionId = missionId;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

    public float getCompleteness() {
        return completeness;
    }

    public void setCompleteness(float completeness) {
        this.completeness = completeness;
    }

    public int getSvnRev() {
        return svnRev;
    }

    public void setSvnRev(int svnRev) {
        this.svnRev = svnRev;
    }

    public Date getGenerateDate() {
        return generateDate;
    }

    public void setGenerateDate(Date generateDate) {
        this.generateDate = generateDate;
    }

    public long getSubmitterId() {
        return submitterId;
    }

    public void setSubmitterId(long submitterId) {
        this.submitterId = submitterId;
    }

    public long getReaderId() {
        return readerId;
    }

    public void setReaderId(long readerId) {
        this.readerId = readerId;
    }

    public User getSubmitter() {
        return submitter;
    }

    public void setSubmitter(User submitter) {
        this.submitter = submitter;
    }

    public User getReader() {
        return reader;
    }

    public void setReader(User reader) {
        this.reader = reader;
    }
}
